#### trained on left trolls, left trolls only
## flipped sign - sign has no meaning with pca
pdf("figs/Figure1Bottom_FigureA2_blm_distraction_replicate_psrm.pdf", width=4.1, height=5)
par(mfrow=c(1,1), mar=c(6,3,4,2), mgp=c(4,1,0))
reference <- na.omit(with(
    subset(
        aggregated_tweets,
        tweet_date >= "2016-01-01"
    ),c(sorting1dl)))
with(
    subset(
        aggregated_tweets,
        tweet_date >= "2016-01-01"
    ),
    plot(
        y=rep(as.Date(tweet_date), 1), x=c(sorting1dl), type="n",
        col="blue",
        bty="n",
        ylab="Tweet Month",
        xlab="\n Politics (-) vs Not politics (+)\n(scale in sd's)",
        lwd=3, cex.lab=1.3,
        main="Left trolls only",
        xlim=c(-1.5, 1.5),
        las=1,
        yaxt="n"
    )
)
axis(
    2,
    seq(as.Date("2016-01-01"),as.Date("2016-11-01"), by="quarter"),
    labels=gsub(
        " ", "\n",
        as.yearmon(
            seq(as.Date("2016-01-01"),as.Date("2016-11-01"),by="quarter")
        )
    ),
    las=2
)
with(
    subset(
        aggregated_tweets,
        tweet_date >= "2016-01-01"
    ),
    lines(
        y=as.Date(tweet_date), x=sorting1dl,
    type="l",
        col="blue",
        lwd=5
    )
)
abline(v=0, lwd=3, lty=2)
abline(v=c(-0.5, 0.5), lwd=1, lty=3)
## ##
par(mfrow=c(1,1), mar=c(6,3,4,2), mgp=c(4,1,0))
reference <- na.omit(with(
    subset(
        aggregated_tweets,
        tweet_date >= "2016-01-01"
    ),c(sorting1dl_orig)))
with(
    subset(
        aggregated_tweets,
        tweet_date >= "2016-01-01"
    ),
    plot(
               y=rep(as.Date(tweet_date), 1), x=c(sorting1dl_orig), type="n",
        col="blue",
        bty="n",
        ylab="Tweet Month",
        xlab="\nPolitical (-) vs Non-political (+)\nDimension 1 of Text Scaling (in sd's)",
        lwd=3, cex.lab=1.3,
        main="Left trolls only\nDimension 1 of Text Scaling",
        xlim=c(-1.5, 1.5),
        las=1,
        yaxt="n"
    )
)
axis(
    2,
    seq(as.Date("2016-01-01"),as.Date("2016-11-01"), by="quarter"),
    labels=gsub(
        " ", "\n",
        as.yearmon(
            seq(as.Date("2016-01-01"),as.Date("2016-11-01"), by="quarter")
        )
    ),
    las=2
)
with(
    subset(
        aggregated_tweets,
        tweet_date >= "2016-01-01"
    ),
    lines(
        y=as.Date(tweet_date), x=sorting1dl_orig,
    type="l",
        col="blue",
        lwd=5
    )
)
abline(v=0, lwd=3, lty=2)
abline(v=c(-0.5, 0.5), lwd=1, lty=3)
## ##
par(mfrow=c(1,1), mar=c(6,3,4,2), mgp=c(4,1,0))
reference <- na.omit(with(
    subset(
        aggregated_tweets,
        tweet_date >= "2016-01-01"
    ),c(sorting2dl_orig)))
with(
    subset(
        aggregated_tweets,
        tweet_date >= "2016-01-01"
    ),
    plot(
               y=rep(as.Date(tweet_date), 1), x=c(sorting2dl_orig), type="n",
        col="blue",
        bty="n",
        ylab="Tweet Month",
        xlab="\nPolitical (-) vs Non-political (+)\nDimension 2 of Text Scaling (in sd's)",
        lwd=3, cex.lab=1.3,
        main="Left trolls only\nDimension 2 of Text Scaling",
        xlim=c(-1.5, 1.5),
        las=1,
        yaxt="n"
    )
)
axis(
    2,
    seq(as.Date("2016-01-01"),as.Date("2016-11-01"), by="quarter"),
    labels=gsub(
        " ", "\n",
        as.yearmon(
            seq(as.Date("2016-01-01"),as.Date("2016-11-01"), by="quarter")
        )
    ),
    las=2
)
with(
    subset(
        aggregated_tweets,
        tweet_date >= "2016-01-01"
    ),
    lines(
        y=as.Date(tweet_date), x=sorting2dl_orig,
    type="l",
        col="blue",
        lwd=5
    )
)
abline(v=0, lwd=3, lty=2)
abline(v=c(-0.5, 0.5), lwd=1, lty=3)
## ##
dev.off()
